﻿<Activity mc:Ignorable="sap"
          x:Class="Neovolve.Toolkit.Workflow.UnitTests.Activities.RetryWithFailure"
          this:RetryWithFailure.FailureException="[New TimeoutException]"
          this:RetryWithFailure.MaxAttemptsAllowed="5"
          this:RetryWithFailure.RetryTimeout="[New TimeSpan(0, 0, 0, 1)]"
          xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
          xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
          xmlns:mv="clr-namespace:Microsoft.VisualBasic;assembly=System"
          xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities"
          xmlns:ntwa="clr-namespace:Neovolve.Toolkit.Workflow.Activities;assembly=Neovolve.Toolkit.Workflow"
          xmlns:s="clr-namespace:System;assembly=mscorlib"
          xmlns:s1="clr-namespace:System;assembly=System"
          xmlns:s2="clr-namespace:System;assembly=System.Xml"
          xmlns:s3="clr-namespace:System;assembly=System.Core"
          xmlns:s4="clr-namespace:System;assembly=System.ServiceModel"
          xmlns:sa="clr-namespace:System.Activities;assembly=System.Activities"
          xmlns:sad="clr-namespace:System.Activities.Debugger;assembly=System.Activities"
          xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"
          xmlns:scg="clr-namespace:System.Collections.Generic;assembly=System"
          xmlns:scg1="clr-namespace:System.Collections.Generic;assembly=System.ServiceModel"
          xmlns:scg2="clr-namespace:System.Collections.Generic;assembly=System.Core"
          xmlns:scg3="clr-namespace:System.Collections.Generic;assembly=mscorlib"
          xmlns:sd="clr-namespace:System.Data;assembly=System.Data"
          xmlns:sl="clr-namespace:System.Linq;assembly=System.Core"
          xmlns:st="clr-namespace:System.Text;assembly=mscorlib"
          xmlns:this="clr-namespace:Neovolve.Toolkit.Workflow.UnitTests.Activities"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	<x:Members>
		<x:Property Name="AttemptsToFail"
		            Type="InArgument(x:Int32)">
			<x:Property.Attributes>
				<RequiredArgumentAttribute />
			</x:Property.Attributes>
		</x:Property>
		<x:Property Name="AttemptsMade"
		            Type="OutArgument(x:Int32)" />
		<x:Property Name="FailureException"
		            Type="InArgument(s:Exception)" />
		<x:Property Name="MaxAttemptsAllowed"
		            Type="InArgument(x:Int32)" />
		<x:Property Name="RetryTimeout"
		            Type="InArgument(x:TimeSpan)" />
	</x:Members>
	<sap:VirtualizedContainerService.HintSize>574,774</sap:VirtualizedContainerService.HintSize>
	<mva:VisualBasic.Settings>Assembly references and imported namespaces for internal implementation</mva:VisualBasic.Settings>
	<Sequence sad:XamlDebuggerXmlReader.FileName="D:\Codeplex\Neovolve.Toolkit\Neovolve.Toolkit.Workflow.UnitTests\Activities\RetryWithFailure.xaml"
	          sap:VirtualizedContainerService.HintSize="534,734">
		<sap:WorkflowViewStateService.ViewState>
			<scg3:Dictionary x:TypeArguments="x:String, x:Object">
				<x:Boolean x:Key="IsExpanded">True</x:Boolean>
			</scg3:Dictionary>
		</sap:WorkflowViewStateService.ViewState>
		<ntwa:Retry sap:VirtualizedContainerService.HintSize="512,610"
		            MaxAttempts="[MaxAttemptsAllowed]"
		            RetryInterval="[RetryTimeout]">
			<ActivityAction>
				<Sequence sap:VirtualizedContainerService.HintSize="486,529">
					<sap:WorkflowViewStateService.ViewState>
						<scg3:Dictionary x:TypeArguments="x:String, x:Object">
							<x:Boolean x:Key="IsExpanded">True</x:Boolean>
						</scg3:Dictionary>
					</sap:WorkflowViewStateService.ViewState>
					<Assign sap:VirtualizedContainerService.HintSize="464,58">
						<Assign.To>
							<OutArgument x:TypeArguments="x:Int32">[AttemptsMade]</OutArgument>
						</Assign.To>
						<Assign.Value>
							<InArgument x:TypeArguments="x:Int32">[AttemptsMade + 1]</InArgument>
						</Assign.Value>
					</Assign>
					<WriteLine sap:VirtualizedContainerService.HintSize="464,61"
					           Text="[&quot;Executing attempt &quot; + AttemptsMade.ToString + &quot; at &quot; + DateTime.Now.ToString(&quot;o&quot;)]" />
					<If Condition="[AttemptsMade &lt;= AttemptsToFail]"
					    sap:VirtualizedContainerService.HintSize="464,206">
						<If.Then>
							<Throw Exception="[FailureException]"
							       sap:VirtualizedContainerService.HintSize="269,100" />
						</If.Then>
					</If>
				</Sequence>
			</ActivityAction>
		</ntwa:Retry>
	</Sequence>
</Activity>